package se.dolkow.skola.datasakerhet.server.storage;

import java.util.LinkedList;
import java.util.List;

public class Patient extends AbstractUser {
	Doctor doctor;
	List<Record> records = new LinkedList<Record>();
	
	public Patient(String name, Doctor doc) {
		super(name);
		this.doctor = doc;
	}

	public boolean isAuthorized(Action a, Record r) {
		return a == Action.READ && r.getPatient().equals(this);
	}

	public boolean canCreateFor(Patient p) {
		return false;
	}

	public Doctor getDoctor() {
		return doctor;
	}
}
